package com.prestamomo.vil.ppa.pmvilpage;

import android.widget.ImageView;

import com.prestamomo.vil.ppa.R;
import com.prestamomo.vil.ppa.pmvilapi.PmvilHttpRequest;
import com.prestamomo.vil.ppa.pmvilnet.pmvillistener.PmvilCallBack;
import com.prestamomo.vil.ppa.pmvilpage.pmrot.PmvilAtyRoot;

public class PmvilCensorVy extends PmvilAtyRoot {

    private ImageView censorPmvilIvback;

    @Override
    protected int getPmvilLayoutId() {
        return R.layout.censor_pmvil_ly;
    }

    @Override
    protected void showPmvilUi() {

        censorPmvilIvback = findViewById(R.id.censor_pmvil_iv_back);

    }

    @Override
    protected void clickePmvil() {
        censorPmvilIvback.setOnClickListener(v -> finish());
    }

    @Override
    protected void loadPmvilData() {
        showPmvilLoading();
        PmvilHttpRequest.getPmvilThress(this, "pmvilCensorls", "pmvilCenlsie", new PmvilCallBack<String>() {
            @Override
            public void onPmvilSucc(String pmvilMethod, String pmvilContent) {
                hindPmvilLoading();
            }

            @Override
            public void onPmvilLogOn(String pmvilMod, String pmvilCtent) {
                    outpmvilLongin();
            }

            @Override
            public void onPmvilOther(String pmvilMhod, String pmvilCnt, String pmvilCode, String pmvilMsg) {
                    hindPmvilLoading();
            }

            @Override
            public void onPmvilFailure(String pmvilMod, String pmvilError) {
                hindPmvilLoading();
            }
        });
    }
}
